package org.buildworld.circuit

/**
 * 
 * 
 * @author Hans Haggstrom
 */

case class Connection( source : Port, target : Port ) extends Updateable{

  if (source != null) source.connection = this
  if (target != null) target.connection = this

  def update(timeChange_ms: Int) = {
    println("Updated connection " + this)
  }

  def delete() {
    if (source != null) source.connection = null
    if (target != null) target.connection = null
  }
}